
THREE.BlendPass =
{
    uniforms:
    {
        "tDiffuse": {type:"t", value:null},
	    "tBlend":   {type:"t", value:null},

        "diffuseVal":   {type:"f", value:1.0},
        "blendVal":     {type:"f", value:0.5}
    },

    vertexShader:[
        "varying vec2 vUv;",

        "void main(){",
            "vUv = uv;",
            "gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);",
        "}"
    ].join("\n"),

    fragmentShader:[
        "uniform sampler2D tDiffuse;",
        "uniform sampler2D tBlend;",

        "uniform float blendVal;",
        "uniform float diffuseVal;",

        "varying vec2 vUv;",

        "void main(){",
            "vec3 color = texture2D(tDiffuse, vUv).rgb;",
            "vec3 blendCol = texture2D(tBlend, vUv).rgb;",
            "float epsilon = 1.0;",
            "if(vUv.x > 0.5)",
            "{",
            "//epsilon = 0.0;",
            "}",
            "vec3 final = color * diffuseVal + blendCol * blendVal * epsilon;",

            "gl_FragColor = vec4(min(final.x, 1.0), min(final.y, 1.0), min(final.z, 1.0), 1.0);",
        "}"
    ].join("\n")
};